//封装一个函数：获取时间来判断 上午|下午|晚上
export const getTime = () => {
  let messageTitle = ''
  const time = new Date().getHours()
  if (time >= 8 && time <= 12) {
    messageTitle = '上午好'
  } else if (time >= 12 && time <= 20) {
    messageTitle = '下午好'
  } else {
    messageTitle = '晚上好'
  }
  return messageTitle
}
